/*
 * @Description:
 * @version:
 * @Author: sunqian_sr
 * @Date: 2023-02-20 19:05:50
 * @LastEditors: Andy
 * @LastEditTime: 2023-02-21 17:51:35
 */
import { Http } from '@/common/api'
// 用户管理
export const listUrl = '/srm/agreement/page'

/**
 * 新增协议
 * @param params
 * @return {*|Promise}
 */
export const apiPostCreatAgreement = async (params) => Http.post('/srm/agreement/create', params)
/**
 * 编辑协议
 * @param params
 * @return {*|Promise}
 */
export const apiPostUpdateAgreement = async (params) => Http.post('/srm/agreement/update', params)
/**
 * 根据ID获取协议详情
 * @param id
 * @return {*|Promise}
 */
export const apiGetAgreementDetail = async (id) => Http.get(`/srm/agreement/detail?agreementId=${id}`)
/**
 * 根据ID删除协议
 * @param ids
 * @return {*|Promise}
 */
export const apiDeleteAgreement = async (ids) => Http.delete(`/srm/agreement/delete?agreementId=${ids}`)

/**
 * 启用协议
 * @param params
 * @return {*|Promise}
 */
export const apiPutAgreementEnble = async (id) => Http.put(`/srm/agreement/enable?agreementId=${id}`)

/**
 * 禁用协议
 * @param params
 * @return {*|Promise}
 */
export const apiPostAgreementDisable = async (id) => Http.put(`/srm/agreement/disable?agreementId=${id}`)
